package com.sumainfor.pc.market.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.service.RepairService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 功能描述:
 * 维修
 * @Auther: zhlu
 * @Date: 2019/5/9 12:05
 * @Description:
 */
@RestController
@RequestMapping("/repair")
public class RepairController {

    Logger log= LoggerFactory.getLogger(RepairController.class);

    @Autowired
    RepairService RepairService;

    /**
     * 功能描述: 
     * 工程助理维修工单池
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/9 12:07
     */
    @PostMapping("/getManagerRepairList")
    public JsonResult getManagerRepairList(@RequestBody Map<String,Object> params,Pager pager){
        pager.setPageno(Integer.valueOf(params.get("pageno").toString()));
        pager.setPagesize(Integer.valueOf(params.get("pagesize").toString()));
        pager.setPagerNecessary(params, pager);
        return RepairService.getManagerRepairList(params);
    }

}
